import java.util.HashSet;

public class demo1 {
    public static void main(String[] args) {

        HashSet<Person> hashSet = new HashSet<>();
        Person p1 = new Person("小王",15);
        Person p2 = new Person("小白",23);
        Person p3 = new Person("Jack",35);

        hashSet.add(p1);
        hashSet.add(p2);
        hashSet.add(p3);

        System.out.println(hashSet.contains(p1));

        System.out.println(hashSet.isEmpty());
        hashSet.clear();
        System.out.println(hashSet.isEmpty());
    }
}
